# 练习2：字符串统计：
# 		提示用户输入任意字符串，统计字符串中每个字符出现的次数
str1 = input("请输入字符串：")
list1 = [*str1]
list1 = set(list1)
dict1 = {}
for value in list1:
    dict1[value] = str1.count(value)
for key,value in dict1.items():
    print(key, str(value) + "次", sep="：")


# str2 = ""
# list1 = []
# for value in str1:
#     list1.append(value)
# list1 = set(list1)
# for value in list1:
#     str2 += value
# for value in str2:
#     print(value + "出现的次数为：" + str(str1.count(value)))


